@include('admin::layouts.header')
<div class="admin-main layui-anim layui-anim-upbit">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>模块配置</legend>
    </fieldset>
    <table class="layui-table" id="list" lay-filter="list"></table>
</div>
@include('admin::layouts.footer')
<script type="text/html" id="barDemo">
    <a href="/admin/modules/@{{d.key}}/edit" class="layui-btn layui-btn-xs">编辑</a>
</script>
<script type="text/html" id="topBtn">
</script>
<script>
    layui.use(['table','form'], function() {
        var table = layui.table,form = layui.form,$ = layui.jquery;
        var tableIn = table.render({
            elem: '#list',
            url: "{{route('admin.modules.data')}}",
            method:'get',
			toolbar: '#topBtn',
			title:'模块配置',
            cols: [[
                {field:'key', title: '模块英文名',align: 'center', width:300}
                ,{field:'value', title: '模块中文名',align: 'center', width:400}
                ,{width:300, title: '操作',align:'center',align: 'center', toolbar: '#barDemo'} 
            ]],
			parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
				  return res;
			}	
        });
    });
</script>
</body>
</html>